//
//  ThreeViewController.m
//  xib-work4
//
//  Created by 金隆 on 2017/4/16.
//  Copyright © 2017年 金隆. All rights reserved.
//

#import "ThreeViewController.h"
#import "ThreeTableViewCell.h"
@interface ThreeViewController ()<UITableViewDelegate,UITableViewDataSource>


@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation ThreeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"消息通知";
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.tableView registerNib:[UINib nibWithNibName:@"ThreeTableViewCell" bundle:nil] forCellReuseIdentifier:@"oneTableCell"];
    
    
    // Do any additional setup after loading the view.
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 4;
    
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 60;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    ThreeTableViewCell *Cell = [tableView dequeueReusableCellWithIdentifier:@"oneTableCell"];
    if  (indexPath.row == 0)
    {
        Cell.contentLab.text = @"本文为博主原创文章，未经博主允许不得转载。";
        Cell.titleLab.text = @"系统消息";
        Cell.oneimg.image = [UIImage imageNamed:@"ima1.png"];
    }
    if (indexPath.row == 1){
        Cell.contentLab.text = @"原点实际上是从导航栏下面开始的，即整个屏幕的.";
        Cell.titleLab.text = @"教师推荐";
        Cell.oneimg.image = [UIImage imageNamed:@"ima1.png"];
    }
    if (indexPath.row == 2){
        Cell.contentLab.text = @"我有一个按钮，要放在屏幕中间的位置，那么在界面大小为 320 x 480点 的设备上";
        Cell.titleLab.text = @"学校通知";
        Cell.oneimg.image = [UIImage imageNamed:@"ima1.png"];
    }
    if (indexPath.row == 3){
        Cell.contentLab.text = @"这种分辨率在正常观看距离下足以使人肉眼无法分辨其中的单独像素。也被称为视网膜显示屏。";
        Cell.titleLab.text = @"个性化推荐";
        Cell.oneimg.image = [UIImage imageNamed:@"ima1.png"];
    }
    return Cell;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
